
/*
 * Copyright 2017 ObjectBox Ltd. All rights reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package io.objectbox.index.model;

import javax.annotation.Nullable;

import io.objectbox.BoxStore;
import io.objectbox.Cursor;
import io.objectbox.EntityInfo;
import io.objectbox.Property;
import io.objectbox.Transaction;
import io.objectbox.internal.CursorFactory;
import io.objectbox.internal.IdGetter;

// THIS CODE was originally GENERATED BY ObjectBox.

/**
 * Properties for entity "EntityLongIndex". Can be used for QueryBuilder and for referencing DB names.
 */
public class EntityLongIndex_ implements EntityInfo<EntityLongIndex> {

    public static final String __NAME_IN_DB = "EntityLongIndex";

    public final static EntityLongIndex_ __INSTANCE = new EntityLongIndex_();

    public final static Property<EntityLongIndex> id = new Property<>(__INSTANCE, 0, 7, long.class, "id", true, "_id");
    public final static Property<EntityLongIndex> indexedLong = new Property<>(__INSTANCE, 1, 1, long.class, "indexedLong");
    public final static Property<EntityLongIndex> float1 = new Property<>(__INSTANCE, 2, 2, Float.class, "float1");
    public final static Property<EntityLongIndex> float2 = new Property<>(__INSTANCE, 3, 3, Float.class, "float2");
    public final static Property<EntityLongIndex> float3 = new Property<>(__INSTANCE, 4, 4, Float.class, "float3");
    public final static Property<EntityLongIndex> float4 = new Property<>(__INSTANCE, 5, 5, Float.class, "float4");
    public final static Property<EntityLongIndex> float5 = new Property<>(__INSTANCE, 6, 6, Float.class, "float5");

    @SuppressWarnings("unchecked")
    public final static Property<EntityLongIndex>[] __ALL_PROPERTIES = new Property[]{
            id,
            indexedLong,
            float1,
            float2,
            float3,
            float4,
            float5
    };

    public final static Property<EntityLongIndex> __ID_PROPERTY = id;

    @Override
    public Property<EntityLongIndex>[] getAllProperties() {
        return __ALL_PROPERTIES;
    }

    @Override
    public Property<EntityLongIndex> getIdProperty() {
        return __ID_PROPERTY;
    }

    @Override
    public String getEntityName() {
        return "EntityLongIndex";
    }

    @Override
    public String getDbName() {
        return __NAME_IN_DB;
    }

    @Override
    public Class<EntityLongIndex> getEntityClass() {
        return EntityLongIndex.class;
    }

    @Override
    public int getEntityId() {
        return 7;
    }

    @Override
    public IdGetter<EntityLongIndex> getIdGetter() {
        return new IdGetter<EntityLongIndex>() {
            @Override
            public long getId(EntityLongIndex object) {
                return object.id;
            }
        };
    }

    @Override
    public CursorFactory<EntityLongIndex> getCursorFactory() {
        return new CursorFactory<EntityLongIndex>() {
            @Override
            public Cursor<EntityLongIndex> createCursor(Transaction tx, long cursorHandle, @Nullable BoxStore boxStoreForEntities) {
                return new EntityLongIndexCursor(tx, cursorHandle, boxStoreForEntities);
            }
        };
    }
}
